﻿package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;

    public class SJoinGuildInfo extends IMessageBase
    {
        public var playerId:int;
        public var name:String;
        public var type:EJoinGuildType;
        public var mode:EInviteMode;
        public var miniGuild:SMiniGuildInfo;
        public var dealResult:int;
        public var guildType:int;
        public const _type:int = 16106;
        public static var _regist:SJoinGuildInfo = new SJoinGuildInfo(true);

        public function SJoinGuildInfo(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SJoinGuildInfo();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.playerId);
            param1.writeString(this.name);
            this.type.__write(param1);
            this.mode.__write(param1);
            this.miniGuild.__write(param1);
            param1.writeInt(this.dealResult);
            param1.writeInt(this.guildType);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.playerId = param1.readInt();
            this.name = param1.readString();
            this.type = EJoinGuildType.__read(param1);
            this.mode = EInviteMode.__read(param1);
            this.miniGuild = new SMiniGuildInfo();
            this.miniGuild.__read(param1);
            this.dealResult = param1.readInt();
            this.guildType = param1.readInt();
            return;
        }// end function

    }
}
